﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace Home.WebUI.Areas.Admin.Models.SalesmanViewModel
{
    /// <summary>
    /// 业务员
    /// </summary>
    public class EditViewModel
    {
        /// <summary>
        /// Id
        /// </summary>
        [DisplayName("Id")]
        public int? Id { get; set; }
        /// <summary>
        /// 姓名
        /// </summary>
        [DisplayName("姓名")]
        [StringLength(5, ErrorMessage = "长度不能超过5个字符")]
        [Required(ErrorMessage = "姓名不能为空")]
        public string Name { get; set; }
        public string UserName { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        [DisplayName("密码")]
        [StringLength(25, ErrorMessage = "长度不能超过25个字符")]
        public string PassWord { get; set; }
        /// <summary>
        /// 确认密码
        /// </summary>
        [DisplayName("确认密码")]
        [StringLength(25, ErrorMessage = "长度不能超过25个字符")]
        [Compare("PassWord", ErrorMessage = "密码和确认密码不匹配。")]
        public string VPassWord { get; set; }
    }
}
